package com.lambda.springbootlambda.construct;

/**
 * @author ytj
 * @date 2021/12/15
 */
public class UserMain {
    public static void main(String[] args) {
        NOParamConstruct noParamConstruct=()->new User();
        User user=noParamConstruct.getUser();
        System.out.println(user);
        NOParamConstruct noParamConstruct1=User::new;
        User user1=noParamConstruct1.getUser();
        System.out.println(user1);
        ParamConstruct paramConstruct=User::new;
        User user2=paramConstruct.getUser("id","name");
        System.out.println(user2);
        Thread thread=new Thread(()->{
            System.out.println(Thread.currentThread().getName()+",执行");
        });
        thread.start();
    }
}
